<?php

require __DIR__.'/init.php';

$img = image_upload('upload');

echo json_encode(array(
    'uploaded' => 1,
    'fileName' => $img['filename'],
    'url' => $img['url'],
));